﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Wjtour.Domain;
using Wjtour.Common;

namespace Wjtour.BLL
{
    public class menu_access_bll : base_dll
    {
        public List<Wjtour.Domain.menu> getMenuList(sysadmin user)
        {
            string sql = @"select a.* from menu as a,menu_access as b where a.id=b.menu_id and b.role_id=" + user.role;
            return this.DbAccess.GetObjects<Wjtour.Domain.menu>(sql).ToList();
        }

        public int BatchDelete(string ids)
        {
            string sql = "delete from menu_access where id in(" + ids + ")";
            return DbAccess.ExecuteNonQuery(sql);
        }
    }
}
